home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TestDrive Windows 1993 Fall
/
TestDrive Windows 1993 Fall.iso
/
opro
/
omniscan.smm
< prev
next >
Wrap
INI File
|
1992-02-03
|
9KB
|
938 lines
[ver]
4
[sty]
[files]
[charset]
82
ANSI (Windows, IBM CP 1252)
[revisions]
0
[prn]
HP LaserJet III
[lang]
1
[desc]
697168752
26
688759401
138
2
0
0
0
0
0
[fopts]
0
1
0
0
[lnopts]
2
Body Text
1
[docopts]
5
2
[tag]
Body Text
2
[fnt]
Courier
240
0
32768
[algn]
1
1
0
0
0
[spc]
33
273
1
0
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Body Text
0
0
[tag]
Body Single
3
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
0
0
0
[spc]
33
273
1
0
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Body Single
0
0
[tag]
Bullet 1
4
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
720
360
360
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
<*0>
360
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Bullet 1
0
0
[tag]
Bullet 2
5
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
1080
360
360
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
<*2>
360
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Bullet 2
0
0
[tag]
Indent 1
6
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
1080
0
0
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Indent 1
0
0
[tag]
Indent 2
7
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
1440
0
0
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Indent 2
0
0
[tag]
Number List
8
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
720
360
360
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
<*:>.
360
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Number List
0
0
[tag]
Bold & Center
9
[fnt]
Tms Rmn
240
0
49153
[algn]
4
1
0
0
0
[spc]
33
273
1
0
144
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Bold & Center
0
0
[tag]
First Indent
11
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
0
720
0
[spc]
33
273
1
144
0
1
100
[brk]
4
[line]
8
0
1
0
1
1
1
10
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
First Indent
0
0
[tag]
Line Above
12
[fnt]
Tms Rmn
240
0
49152
[algn]
1
1
0
0
0
[spc]
33
273
1
288
0
1
100
[brk]
4
[line]
5
0
1
0
1
2
1
92
10
1
[spec]
0
0
0
1
1
0
0
0
0
[nfmt]
272
1
2
.
,
$
Line Above
0
0
[lay]
Standard
513
[rght]
15840
12240
1
1440
1440
1
1440
1440
2
1
0
1
1
2
1
1440
10800
5
1
720
1
1440
1
2880
1
4320
1
5760
[hrght]
[lyfrm]
1
11200
0
0
12240
1440
0
1
3
1 0 0 0 0 0 0
0
0
1
[frmlay]
1440
12240
1
1440
72
1
360
1440
0
1
0
1
1
0
1
1440
10800
0
[txt]
>
[frght]
[lyfrm]
1
13248
0
14400
12240
15840
0
1
3
1 0 0 0 0 0 0
0
0
2
[frmlay]
15840
12240
1
1440
360
1
14472
1440
0
1
0
1
1
0
1
1440
10800
0
[txt]
>
[elay]
[l1]
0
[edoc]
'Install the menu item for scanning text into the current document.
FUNCTION InitOmniscan()
'install the menu item
status = AddMenuItem(1,"&File","Scan Text...","omniscan.smm!Omniscan")
END FUNCTION
'**************************************************************************************
'Perform OCR and load it directly into the current Ami document. Since Ami Pro uses the
'brainless method of unloading a DLL after each routine gets called, it is not possible
'to break the DLL into component pieces that allow the macro-writer flexibility.
'Instead, the only option is to make a single call to do everything, which doesn't give
'the user much option to control anything if they want to. Such are the limits placed
'upon products by short-sighted developers.....
FUNCTION Omniscan()
'define the full pathname of the temporary scratch file to use
tempfile = "c:\ocrtemp.sam"
'verify that there is an open document in AmiPro to put the scanned data into
Check = DLLLocate("Omniscan.dll","OcrFindCloseCommand","I")
status = DLLCall(Check)
if (status <<<;> 0) then
Message("There is no open document to scan the text into")
Goto finished
endif
'establish link to the DLL routine to be used and perform Ocr; if failed,
'report it
Perform = DLLLocate("Omniscan.dll","OcrPerformAll","ICC")
status = DLLCall(Perform,"{tempfile}","Ami Professional")
if (status <<<;> 0) and (status <<<;> -11) then
Message("OCR did not complete properly.")
endif
'if there is no results file, then we're done
Check = DLLLocate("Omniscan.dll","OcrFileCheck","IC")
status = DLLCall(Check,"{tempfile}")
if (status <<<;> 0) then
Goto finished
endif
'***** the following is the method for inserting the OCR output file in AmiPro V1.2;
'***** this code should be uncommented-out and used if V1.2 is being used, with the
'***** V2.0 code further below being commented out
'save the current cursor position
'MarkBookMark("OcrPaste",AddBookmark)
'go to the end of the document and save that position
'Type("<[>CtrlEnd]")
'MarkBookMark("OcrStart",AddBookmark)
'append the temporary file to the current file
'Append("{tempfile}",AmiFile,0)
'mark from the start location to the end of the document and cut the text
'MarkBookMark("OcrStart",FindBookmark)
'Type("<[>CtrlShiftEnd]")
'Cut()
'return to the original cursor position and paste the text back into the document
'MarkBookMark("OcrPaste",FindBookmark)
'Paste()
'delete the bookmarks
'MarkBookMark("OcrPaste",DeleteBookmark)
'MarkBookMark("OcrStart",DeleteBookmark)
'***** the following is the method for inserting the OCR output file in AmiPro V2.0;
'***** if V1.2 of Ami Pro is being used, this code should be commented-out and not
'***** used, with the V1.2 code above being used instead
'insert the file into the current location of the current file
FileOpen("{tempfile}",9,"")
'***** this next code section is required for both V1.2 and V2.0 (don't remove it)
'delete the temporary file via a function in the DLL
Cleanup = DLLLocate("Omniscan.dll","OcrDeleteFile","IC")
DLLCall(Cleanup,"{tempfile}")
finished:
END FUNCTION
>
[Embedded]
00007804
>
[macsum] 2
InitOmniscan 0 0 2 2
Omniscan 94 0 6 18
[macse]
14 InitOmniscan
0 516 1 "&File" "Scan Text..." "omniscan.smm!Omniscan"
13
8 1
6 0
15
9
14 Omniscan
7 "c:\ocrtemp.sam"
8 1
0 283 "Omniscan.dll" "OcrFindCloseCommand" "I"
13
8 2
0 284 "{2}"
13
8 3
6 3
5 0
18 1
11 00000214
0 3 "There is no open document to scan the text into"
10 00000616
0 283 "Omniscan.dll" "OcrPerformAll" "ICC"
13
8 4
0 284 "{4}" "{1}" "Ami Professional"
13
8 3
6 3
5 0
18 1
6 3
5 -11
18 1
1 1
11 00000404
0 3 "OCR did not complete properly."
0 283 "Omniscan.dll" "OcrFileCheck" "IC"
13
8 2
0 284 "{2}" "{1}"
13
8 3
6 3
5 0
18 1
11 00000525
10 00000616
2 102 1 "{1}" 9 ""
0 283 "Omniscan.dll" "OcrDeleteFile" "IC"
13
8 5
0 284 "{5}" "{1}"
6 0
15
9
00007829